package com.rjpacket.supernews.app;

import android.support.v4.app.FragmentActivity;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;


public class BaseActivity extends FragmentActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public void setContentView(int layoutResId) {
        super.setContentView(layoutResId);

        ImageView back = (ImageView) findViewById(R.id.actionbar_back);
        back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.actionbar_back:
                finish();
                overridePendingTransition(R.anim.activity_stop, R.anim.activity_right_out);
                break;
        }
    }
}
